import { createApp } from "vue";
import "./assets/css/index.css"; //导入公共基础样式
import router from "./router"; //导入/src/router/index.ts 路由
import ElementPlus from "element-plus"; //导入 ElementPlus 库
import "element-plus/dist/index.css"; //导入 ElementPlus 自带样式
import App from "./App.vue"; //创建 Vue 实例
import axios from "axios";
import pinia from "./stores";
import "element-plus/dist/index.css";
import * as ElementPlusIconsVue from "@element-plus/icons-vue";

// 全局注册所有图标（或按需注册）

const app = createApp(App);
//注册 router 路由
app.use(router);
//注册 ElementPlus 模块
app.use(ElementPlus);
app.use(pinia);
//挂载 Vue 实例
app.mount("#app");
app.config.globalProperties.$axios = axios;
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component);
}
